<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<jsp:useBean id="today" class="java.util.Date"/>
<c:set var="eventday" value="${eventdate }"/>
<fmt:formatDate value="${today}" dateStyle="long" pattern="yyyyMMdd" var="today"/>



<h2 class="page_title"><strong>MY PAGE</strong></h2>
<div class="memberView">

	<div class="simple_info clear">
		<h3 class="page_title"><strong>Simple information</strong></h3>
		
		<div class="view_img float_l">
			<s:if test="resultClass.file_savname != null"><%-- <s:property value="fileUploadPath"/> --%>
				<img src="C:\\project_file\\member\\<s:property value="resultClass.file_savname"/>" alt="${resultClass.nickname}의 프로필사진" />
			</s:if>
			<s:else>
				<p class="align_c">등록된 사진이 없습니다. <br />회원정보수정에서 사진을 업로드하실 수 있습니다.</p>
			</s:else>
		</div><!-- view_image -->
		
		<div class="profile float_r"><s:property value="resultClass.profile"/></div><!-- profile -->
		<div class="view_info float_l">
			<table class="table_list">
				<colgroup>
					<col width="150px"/>
					<col />
				</colgroup>
				 <tr>
				 	<th>id</th>
				 	<th>nickname</th>
				 	<th>height</th>
				 	<th>blood</th>
				 	<th>religion</th>
				 	<th>hobby</th>
				 	<th>style</th>
				 </tr>
				 <tr>
				 	<td><s:property value="resultClass.id"/></td>
				 	<td><s:property value="resultClass.nickname"/></td>
				 	<td><s:property value="resultClass.height"/></td>
				 	<td><s:property value="resultClass.blood"/></td>
				 	<td><s:property value="resultClass.religion"/></td>
				 	<s:if test="resultClass.hobby==null"><td>선택안함</td></s:if>
				 	<s:else><td><s:property value="resultClass.hobby"/></td></s:else> 
				 	<td><s:property value="resultClass.style"/></td>
				 </tr>
			</table>
		</div><!-- view_info -->
	</div><!-- simple_info -->
 
 
	<h3 class="page_title"><strong>POINT</strong></h3>
	
	  <table class="table_view">
	  <colgroup>
	  	<col width="150px" />
	  	<col />
	  </colgroup>
	  	<tr>
		 	<th>point</th>
		 	<td><s:property value="resultClass.point"/></td>
		 </tr>
		 <tr>
		 	<th>eventCount</th>
		 	<td><s:property value="resultClass.eventCount"/></td>
		 </tr>
		 <tr>
		 	<th>meetsituation</th>
		 		
		 	<td><s:iterator value="mlist" status="stat"><strong><a href="EviewAction.action?no=<s:property value="no"/>"><s:property value="subject"/></a></strong>&nbsp;&nbsp;</s:iterator>	</td>
	             
		 </tr>
	  </table>
	  
	
	<h3 class="page_title"><strong>MY MEETING</strong></h3>
	
		<s:iterator value="mlist" status="stat">

 <table class="table_list">
  	<tr>
	 	<th>no</th>
	 	<th>subject</th>
	 	<th>EVENTDATE</th>
	 	<th>진행상황</th>
	 	<th>&nbsp;<th>
	 </tr>
	 <tr>
	 	<td><s:property value="no"/></td>
	 	<s:url id="viewURL" action="EviewAction" >
			<s:param name="no">
				<s:property value="no" />
			</s:param>
		</s:url>
		<input type="hidden" name="no" value="<s:property value="no"/>"/>
	 	<td><s:a href ="%{viewURL}"><s:property value="subject"/></s:a></td>
	 	<td><s:property value="eventdate"/></td>
	 	<td>
     	<fmt:parseDate value="${eventdate}" var="eventday" pattern="yyyy-MM-dd"/>  	
     	<fmt:formatDate value="${eventday }" dateStyle="long" pattern="yyyyMMdd" var="eventtime" />
		<c:choose>
		<c:when test="${today le eventtime }"><strong>진행중</strong></c:when>
		<c:otherwise><strong>종료됨</strong></c:otherwise>
		</c:choose>
	 	</td>
	 	<td><a href = "eventDelete.action?no=<s:property value="no"/>">신청취소</a></td>
	 </tr>
  </table>
</s:iterator>

	<p class="align_r"><a href="memberinfo.action"><b>회원정보상세보기</b></a></p>

</div><!-- memberView -->
<s:iterator value="list" status="stat">
		<s:url id="viewURL" action="EviewAction">
			<s:param name="no">
				<s:property value="meetsituation" />
			</s:param>
			<s:param name="currentPage">
				<s:property value="currentPage" />
			</s:param>
		</s:url>
		<tr>
			<s:if test="#session.session_id==null">
				<td class="align_l">&nbsp;
					<s:property value="subject" />
				</td>
			</s:if>
			<s:else>
				<td class="align_l">&nbsp;
					<s:a href="%{viewURL}"><s:property value="subject" /></s:a>
				</td>
			</s:else>
			<td><s:property value="eventdate" /></td>
		</tr>
	</s:iterator>
